// TimeObject.cpp: implementation of the TimeObject class.
//
//////////////////////////////////////////////////////////////////////

#include "TimeObject.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

TimeObject::TimeObject()
{
	QueryPerformanceFrequency(&ticksPerSecond);
}

TimeObject::~TimeObject()
{

}

void TimeObject::Start()
{
	QueryPerformanceCounter(&m_Start);
}

double TimeObject::Stop()
{
	QueryPerformanceCounter(&m_End);
	dblTime = static_cast<double>(m_End.QuadPart - m_Start.QuadPart) 
					/ static_cast<double>(ticksPerSecond.QuadPart);
	return dblTime;
}
